package com.meedoll.manager.std.client.mainpanel.composites;

import java.util.Iterator;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class JinHuoManagerComposite extends Composite implements HasWidgets {
	private FlexTable flexTable = null;

	public JinHuoManagerComposite( FlexTable flexTable) {
		// final FlexTable flexTable = new FlexTable();
		this.flexTable = flexTable;
		setFlexTableComents(flexTable);
		initWidget(flexTable);
	}

	private void setFlexTableComents(final FlexTable flexTable_content) {
		Button button_7 = new Button("New 123");
		flexTable_content.setWidget(0, 7, button_7);

		Image image_1 = new Image((String) null);
		flexTable_content.setWidget(1, 6, image_1);

		Button button_5 = new Button("New button");
		flexTable_content.setWidget(2, 0, button_5);

		Label label = new Label("New label");
		flexTable_content.setWidget(2, 1, label);

		Image image = new Image((String) null);
		flexTable_content.setWidget(2, 2, image);

		Label label_1 = new Label("New label");
		flexTable_content.setWidget(2, 3, label_1);

		Button button_6 = new Button("New button");
		flexTable_content.setWidget(2, 4, button_6);

		Label label_4 = new Label("New label");
		flexTable_content.setWidget(2, 5, label_4);

		Image image_2 = new Image((String) null);
		flexTable_content.setWidget(3, 6, image_2);

		Button button_8 = new Button("New button");
		flexTable_content.setWidget(4, 7, button_8);

		Label label_2 = new Label("New label");
		flexTable_content.setWidget(5, 0, label_2);

		Label label_3 = new Label("New label");
		flexTable_content.setWidget(6, 0, label_3);

		Button button_10 = new Button("New button");
		flexTable_content.setWidget(7, 0, button_10);

		Label label_5 = new Label("New label");
		flexTable_content.setWidget(7, 1, label_5);

		Button button_9 = new Button("New button");
		flexTable_content.setWidget(7, 4, button_9);

		Label label_8 = new Label("New label");
		flexTable_content.setWidget(7, 5, label_8);

		Button button_11 = new Button("New button");
		flexTable_content.setWidget(7, 7, button_11);

		Label label_6 = new Label("New label");
		flexTable_content.setWidget(8, 1, label_6);

		Button button_12 = new Button("New button");
		flexTable_content.setWidget(9, 0, button_12);

		Label label_7 = new Label("New label");
		flexTable_content.setWidget(9, 1, label_7);

		Button button_13 = new Button("New button");
		flexTable_content.setWidget(9, 4, button_13);

		Label label_9 = new Label("New label");
		flexTable_content.setWidget(9, 5, label_9);

		Button button_14 = new Button("New button");
		flexTable_content.setWidget(9, 7, button_14);

	}

	public JinHuoManagerComposite() {

		FlexTable flexTable_content = new FlexTable();
		initWidget(flexTable_content);
		Button button_7 = new Button("New button");
		flexTable_content.setWidget(0, 7, button_7);

		Image image_1 = new Image((String) null);
		flexTable_content.setWidget(1, 6, image_1);

		Button button_5 = new Button("New button");
		flexTable_content.setWidget(2, 0, button_5);

		Label label = new Label("New label");
		flexTable_content.setWidget(2, 1, label);

		Image image = new Image((String) null);
		flexTable_content.setWidget(2, 2, image);

		Label label_1 = new Label("New label");
		flexTable_content.setWidget(2, 3, label_1);

		Button button_6 = new Button("New button");
		flexTable_content.setWidget(2, 4, button_6);

		Label label_4 = new Label("New label");
		flexTable_content.setWidget(2, 5, label_4);

		Image image_2 = new Image((String) null);
		flexTable_content.setWidget(3, 6, image_2);

		Button button_8 = new Button("New button");
		flexTable_content.setWidget(4, 7, button_8);

		Label label_2 = new Label("New label");
		flexTable_content.setWidget(5, 0, label_2);

		Label label_3 = new Label("New label");
		flexTable_content.setWidget(6, 0, label_3);

		Button button_10 = new Button("New button");
		flexTable_content.setWidget(7, 0, button_10);

		Label label_5 = new Label("New label");
		flexTable_content.setWidget(7, 1, label_5);

		Button button_9 = new Button("New button");
		flexTable_content.setWidget(7, 4, button_9);

		Label label_8 = new Label("New label");
		flexTable_content.setWidget(7, 5, label_8);

		Button button_11 = new Button("New button");
		flexTable_content.setWidget(7, 7, button_11);

		Label label_6 = new Label("New label");
		flexTable_content.setWidget(8, 1, label_6);

		Button button_12 = new Button("New button");
		flexTable_content.setWidget(9, 0, button_12);

		Label label_7 = new Label("New label");
		flexTable_content.setWidget(9, 1, label_7);

		Button button_13 = new Button("New button");
		flexTable_content.setWidget(9, 4, button_13);

		Label label_9 = new Label("New label");
		flexTable_content.setWidget(9, 5, label_9);

		Button button_14 = new Button("New button");
		flexTable_content.setWidget(9, 7, button_14);

	}

	@Override
	public void add(Widget w) {
		flexTable.add(w);
	}

	@Override
	public void clear() {
		flexTable.clear();
	}

	@Override
	public Iterator<Widget> iterator() {
		return flexTable.iterator();
	}

	@Override
	public boolean remove(Widget w) {
		return flexTable.remove(w);
	}

}
